package com.ruoyi.index.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.index.mapper.FhIndexHotMapper;
import com.ruoyi.index.domain.FhIndexHot;
import com.ruoyi.index.service.IFhIndexHotService;

/**
 * 热点Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-12
 */
@Service
public class FhIndexHotServiceImpl implements IFhIndexHotService 
{
    @Autowired
    private FhIndexHotMapper fhIndexHotMapper;

    /**
     * 查询热点
     * 
     * @param id 热点主键
     * @return 热点
     */
    @Override
    public FhIndexHot selectFhIndexHotById(Long id)
    {
        return fhIndexHotMapper.selectFhIndexHotById(id);
    }

    /**
     * 查询热点列表
     * 
     * @param fhIndexHot 热点
     * @return 热点
     */
    @Override
    public List<FhIndexHot> selectFhIndexHotList(FhIndexHot fhIndexHot)
    {
        return fhIndexHotMapper.selectFhIndexHotList(fhIndexHot);
    }

    /**
     * 新增热点
     * 
     * @param fhIndexHot 热点
     * @return 结果
     */
    @Override
    public int insertFhIndexHot(FhIndexHot fhIndexHot)
    {
        return fhIndexHotMapper.insertFhIndexHot(fhIndexHot);
    }

    /**
     * 修改热点
     * 
     * @param fhIndexHot 热点
     * @return 结果
     */
    @Override
    public int updateFhIndexHot(FhIndexHot fhIndexHot)
    {
        fhIndexHot.setUpdateTime(DateUtils.getNowDate());
        return fhIndexHotMapper.updateFhIndexHot(fhIndexHot);
    }

    /**
     * 批量删除热点
     * 
     * @param ids 需要删除的热点主键
     * @return 结果
     */
    @Override
    public int deleteFhIndexHotByIds(Long[] ids)
    {
        return fhIndexHotMapper.deleteFhIndexHotByIds(ids);
    }

    /**
     * 删除热点信息
     * 
     * @param id 热点主键
     * @return 结果
     */
    @Override
    public int deleteFhIndexHotById(Long id)
    {
        return fhIndexHotMapper.deleteFhIndexHotById(id);
    }
}
